Current Location: Home> Function Categories> dechex

dechex

Convert decimal to hexadecimal
Name:dechex
Category:math
Programming Language:php
One-line Description:Convert decimal to hexadecimal.

Definition and usage

dechex() function converts decimal to hexadecimal.

Example

 <?php
echo dechex ( "30" ) ;
echo dechex ( "10" ) ;
echo dechex ( "1587" ) ;
echo dechex ( "70" ) ;
?>

Try it yourself

grammar

 dechex ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing the hexadecimal representation of the given binary_string parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "ffffffff".

Similar Functions
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Get the pi value pi

    pi

    Getthepivalue
  • Round floating point numbers round

    round

    Roundfloatingpointnu
  • Anyway atan

    atan

    Anyway
  • Convert angle to radians deg2rad

    deg2rad

    Convertangletoradian
  • Hyperbolic tangent tanh

    tanh

    Hyperbolictangent
Popular Articles